package cn.iocoder.yudao.module.system.dal.mysql.user;

import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.user.UserDeptDO;
import cn.iocoder.yudao.module.system.dal.dataobject.user.UserTenantDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserTenantMapper extends BaseMapperX<UserTenantDO> {


    default List<UserTenantDO> selectList(UserTenantDO userDeptDO) {
        return selectList(new LambdaQueryWrapperX<UserTenantDO>()
                .eqIfPresent(UserTenantDO::getId,userDeptDO.getId())
                .eqIfPresent(UserTenantDO::getTenantId,userDeptDO.getTenantId())
                .eqIfPresent(UserTenantDO::getUserId,userDeptDO.getUserId())
               );
    }




}
